/**
 * @author Ahammer
 * @date 2010 05
 */

/*
 * This file is part of Iqm.
 * Copyright (c) 2010-2011 Helmut Ahammer
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package opjai;
import java.awt.RenderingHints;
import java.awt.image.RenderedImage;
import java.awt.image.renderable.ParameterBlock;
import java.awt.image.renderable.RenderedImageFactory;
import javax.media.jai.ImageLayout;

public class IqmImgStabilizerRIF implements RenderedImageFactory{
 
  public IqmImgStabilizerRIF(){
  }
  
  public RenderedImage create(ParameterBlock pb, RenderingHints hints){ 
	RenderedImage source = pb.getRenderedSource(0);  
	ImageLayout layout = new ImageLayout(source);  
	//ImageLayout layout = RIFUtil.getImageLayoutHint(hints); //problems for large images
    return new IqmImgStabilizerOpImage(	pb.getRenderedSource(0),
    								pb.getRenderedSource(1),
    								pb.getIntParameter(0),
    								pb.getIntParameter(1),
    								pb.getFloatParameter(2),
    								pb.getFloatParameter(3),
    								pb.getFloatParameter(4),
    								pb.getIntParameter(5),
    								layout, hints, false);
   }
}

